add
Adds the given word to the dictionary and schedules a write to disk.
Return
true if the given word is valid and not a duplicate
Parameters
word
a word to add to the dictionary. It must be UTF8, between 1 and 99 bytes long, and without leading or trailing ASCII whitespace
Throws
when word is empty or blank
when the engine is closed
Adds the given words to the dictionary and schedules a write to disk.
Return
a list of sanitation errors if words contains duplicates or invalid words, or an empty list if all words were added successfully
Since
8.14.0
Parameters
words
a set of words to add to the dictionary. Each word must be UTF8, between 1 and 99 bytes long, and without leading or trailing ASCII whitespace
Throws
when words is empty
when the engine is closed